package phoenix.core.helpers;

import phoenix.core.PhoenixManager;
import phoenix.core.base.HelperBase;
import phoenix.web.page_objects.crm.*;

public class PageMailHelper extends HelperBase
{
	private WelcomeMailPage welcomePage;
	private MatchMailPage matchPage;
	private BrowseMailPage browsePage;
	private MessageMailPage messagePage;
	private WinkMailPage winkPage;
	private ForgotPage forgotPage;

	/**
	 * Initializes PageMailHelper
	 * @param p_phoenix PhoenixManager instance
	 */
	public PageMailHelper(PhoenixManager p_phoenix)
	{
		super(p_phoenix);
	}

	public WelcomeMailPage welcomeLetter()
	{
		if (welcomePage == null)
		{
			welcomePage = new WelcomeMailPage(phoenix);
		}
		return welcomePage;
	}

	public MatchMailPage matchLetter()
	{
		if (matchPage == null)
		{
			matchPage = new MatchMailPage(phoenix);
		}
		return matchPage;
	}

	public BrowseMailPage browseLetter()
	{
		if (browsePage == null)
		{
			browsePage = new BrowseMailPage(phoenix);
		}
		return browsePage;
	}

	public WinkMailPage winkLetter()
	{
		if (winkPage == null)
		{
			winkPage = new WinkMailPage(phoenix);
		}
		return winkPage;
	}

	public MessageMailPage messageLetter()
	{
		if (messagePage == null)
		{
			messagePage = new MessageMailPage(phoenix);
		}
		return messagePage;
	}

	public ForgotPage forgotLetter()
	{
		if (forgotPage == null)
		{
			forgotPage = new ForgotPage(phoenix);
		}
		return forgotPage;
	}

}
